home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- //
- // Creation Date: May 29, 1997
- // Author: ajp
- //
- // Procedure Name:
- // AEmeshTemplate
- //
- // Description Name;
- // Creates the attribute editor controls for the mesh node
- //
- // Input Value:
- // nodeName
- //
- // Output Value:
- // None
- //
-
- global proc checkMeshDisplayBorder ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".displayBorders";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "borderWidth" false;
- } else {
- editorTemplate -dimControl $nodeName "borderWidth" true;
- }
- }
-
- global proc checkMeshUseMaxSubd ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".useMaxSubdivisions";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "maxSubd" false;
- } else {
- editorTemplate -dimControl $nodeName "maxSubd" true;
- }
- }
-
- global proc checkMeshUseMinScreen ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".useMinScreen";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "minScreen" false;
- } else {
- editorTemplate -dimControl $nodeName "minScreen" true;
- }
- }
-
- global proc checkMeshUseMaxEdgeLength ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".useMaxEdgeLength";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "maxEdgeLength" false;
- } else {
- editorTemplate -dimControl $nodeName "maxEdgeLength" true;
- }
- }
-
- global proc checkMeshUseMaxUv ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".useMaxUV";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "maxUv" false;
- } else {
- editorTemplate -dimControl $nodeName "maxUv" true;
- }
- }
-
-
-
- global proc checkMeshUseMinEdgeLength ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".useMinEdgeLength";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "minEdgeLength" false;
- } else {
- editorTemplate -dimControl $nodeName "minEdgeLength" true;
- }
- }
-
- global proc checkMeshDisplayNormals ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".displayNormal";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "normalSize" false;
- editorTemplate -dimControl $nodeName "normalType" false;
- } else {
- editorTemplate -dimControl $nodeName "normalSize" true;
- editorTemplate -dimControl $nodeName "normalType" true;
- }
- }
-
- global proc checkMeshDisplayVertices ( string $nodeName )
- {
- string $nodeAttr = $nodeName + ".displayVertices";
- int $value = `getAttr $nodeAttr`;
-
- if ( $value ) {
- editorTemplate -dimControl $nodeName "vertexBackfaceCulling" false;
- } else {
- editorTemplate -dimControl $nodeName "vertexBackfaceCulling" true;
- }
- }
-
- global proc AEmeshTemplate( string $nodeName )
- {
- editorTemplate -beginScrollLayout;
-
-
- editorTemplate -beginLayout "Tessellation Attributes";
-
- editorTemplate -addControl "maxTriangles";
-
- editorTemplate -addControl "useMaxSubdivisions"
- "checkMeshUseMaxSubd";
- editorTemplate -addControl "maxSubd";
-
- editorTemplate -addControl "useMinScreen"
- "checkMeshUseMinScreen";
- editorTemplate -addControl "minScreen";
-
- editorTemplate -addControl "useMaxUV"
- "checkMeshUseMaxUv";
- editorTemplate -addControl "maxUv";
-
- editorTemplate -addControl "useMinEdgeLength"
- "checkMeshUseMinEdgeLength";
- editorTemplate -addControl "minEdgeLength";
-
- editorTemplate -addControl "useMaxEdgeLength"
- "checkMeshUseMaxEdgeLength";
- editorTemplate -addControl "maxEdgeLength";
-
- editorTemplate -endLayout;
-
- editorTemplate -beginLayout "Mesh Component Display";
- editorTemplate -beginNoOptimize;
- editorTemplate -addControl "displayVertices";
- //"checkMeshDisplayVertices";
- editorTemplate -addControl "vertexBackfaceCulling";
- editorTemplate -addControl "backfaceCulling";
- editorTemplate -endNoOptimize;
-
- editorTemplate -addSeparator;
-
- editorTemplate -addControl "displayBorders"
- "checkMeshDisplayBorder";
- editorTemplate -addControl "borderWidth";
-
- editorTemplate -addSeparator;
-
- editorTemplate -addControl "displayEdges";
- editorTemplate -beginNoOptimize;
- editorTemplate -addControl "displayCenter";
- editorTemplate -addControl "displayTriangles";
- editorTemplate -addControl "displayUVs";
- editorTemplate -endNoOptimize;
-
- editorTemplate -addSeparator;
-
- editorTemplate -addControl "displayNormal"
- "checkMeshDisplayNormals";
- editorTemplate -addControl "normalSize";
- editorTemplate -addControl "normalType";
-
- editorTemplate -addSeparator;
-
- editorTemplate -suppress "displayItemNumbers";
- editorTemplate -addControl "displayNonPlanar";
-
- editorTemplate -addControl "materialBlend";
- editorTemplate -endLayout;
-
- editorTemplate -beginLayout "Mesh Controls";
- editorTemplate -addControl "currentUVSet";
- editorTemplate -addControl "allowTopologyMod";
- editorTemplate -endLayout;
-
- // include/call base class/node attributes
- AEsurfaceShapeTemplate $nodeName;
-
- // supressed attributes
- editorTemplate -suppress "inMesh";
- editorTemplate -suppress "outMesh";
- editorTemplate -suppress "cachedInMesh";
- editorTemplate -suppress "useNumTriangles";
- editorTemplate -suppress "numTriangles";
- editorTemplate -suppress "pnts";
- editorTemplate -suppress "colors";
- editorTemplate -suppress "colorPerVertex";
- editorTemplate -suppress "normalPerVertex";
- editorTemplate -suppress "uvSet";
- editorTemplate -suppress "normals";
- editorTemplate -suppress "displayFacesWithGroupId";
- editorTemplate -suppress "userTrg";
-
- editorTemplate -addExtraControls;
- editorTemplate -endScrollLayout;
-
- }
-